<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<script>
		console.log("-----特殊情况的比较运算----------")
		console.table("+0 === -0是：",+0 === -0) //true
		console.table("+0 == -0是：",+0 == -0) //true
		console.table("undefined === undefined是：",undefined === undefined) //true
		console.table("undefined == undefined是：",undefined == undefined) //true
		console.table("null == null是：",null == null)//true
		console.table("null === null是：",null === null)//true
		console.table("null== undefined是：",null== undefined)//true
		console.table("null=== undefined是：",null=== undefined)//false
		console.table("NaN== NaN是：",NaN== NaN)//false
		console.table("NaN=== NaN是：",NaN=== NaN)//false
		console.table("[]=== []是：",[]===[])//false
		console.table("[]== []是：",[]==[])//false
		console.table("{}== {}是：",{}=={})//false
		console.table("{}=== {}是：",{}==={})//false
		console.table("''=== ''是：",''==='')//true
		console.table("''== ''是：",''=='')//true
		console.table("''== true是：",''==true)//false
		console.table("''== false是：",''==false)//true
		console.table("[]== true是：",[]==true)//false
		console.table("[]== false是：",[]==false)//true
		console.table("{}== true是：",{}==true)//false
		console.table("{}== false是：",{}==false)//false


		console.log("-----不同类型与number类型之间的转化----------")
		console.table("Number(ture)是：",Number(true)) //1
		console.table("Number(false)是：",Number(false)) //0
		console.table("Number('')是：",Number('')) //0
		console.table("Number('123')是：",Number('123')) //123
		console.table("Number('哈哈哈')是：",Number('哈哈哈')) //NaN
		console.table("Number('123哈哈哈')是：",Number('123哈哈哈')) //NaN
		console.table("Number([])是：",Number([])) //0
		console.table("Number([1,2,3])是：",Number([1,2,3])) //NaN
		console.table("Number([132])是：",Number([132])) //132
		console.table("Number({})是：",Number({})) //NaN
		console.table("Number(null)是：",Number(null)) //0
		console.table("Number(undefined)是：",Number(undefined)) //NaN


		console.log("-----不同类型本身的真假值判断----------")
		console.table("Boolean('')是：",Boolean("")) //false
		console.table("Boolean('123')是：",Boolean("123")) //true
		console.table("Boolean(999)是：",Boolean(999)) //true
		console.table("Boolean(0)是：",Boolean(0)) //false
		console.table("Boolean([])是：",Boolean([])) //true
		console.table("Boolean([1,2,3])是：",Boolean([1,2,3])) //true
		console.table("Boolean({})是：",Boolean({})) //true
		console.table("Boolean(null)是：",Boolean(null)) //false
		console.table("Boolean(undefined)是：",Boolean(undefined)) //false
		console.table("Boolean(NaN)是：",Boolean(NaN)) //false


		console.log("-----特殊情况的真假值判断----------")
		var test1 = new Boolean(" ");
		var test2 = new Boolean(0)
		console.table("new Boolean('')是：",Boolean(test1),test1.valueOf()) //false
		console.table("new Boolean('')是：",Boolean(test2),test2.valueOf()) //false



	</script>
</body>
</html>